import request from '@/utils/request'

// 订单-售后单分页查询
export const getRefundList = (param, option) => {
  return request.get('/store/refund-orders/page', param, option)
}

// 售后填写物流信息
export const logisticsFill = (param, option) => {
  return request.post('/store/refund-orders/users/logistics/fill', param, option)
}

// 售后单未确认收货或者驳回退款
export const unConfirm = (param, option) => {
  return request.post('/store/refund-orders/unconfirm', param, option)
}

// 售后单确认收货
export const refundConfirm = (param, option) => {
  return request.post('/store/refund-orders/confirm', param, option)
}

// 商家发起订单部分退&调整单
export const partReturn = (param, option) => {
  return request.post('/store/refund-orders/part-apply', param, option)
}

// 审核用户退单
export const check = (param, option) => {
  return request.post('/store/refund-orders/check', param, option)
}

// 商家发起取消订单&整单退
export const cancelOrder = (param, option) => {
  return request.post('/store/refund-orders/apply', param, option)
}

// 获取售后单详情
export const refundDetail = (refundOrderId, option) => {
  return request.get(`/store/refund-orders/${refundOrderId}`, {}, option)
}

// 获取退单轨迹
export const getRefundOrderTracks = (refundOrderId, option) => {
  return request.get(`/store/refund-orders/${refundOrderId}/tracks`, {}, option)
}

